Update FindMax to use Math.max for maximum calculation#7262
Update FindMax to use Math.max for maximum calculation#7262MuhammadMuneebMubashar wants to merge 7 commits intoTheAlgorithms:masterfrom
Conversation
Fix logic to find maximum value in the array.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7262 +/- ##
=========================================
Coverage 79.43% 79.43%
- Complexity 7062 7063 +1
=========================================
Files 788 788
Lines 23124 23122 -2
Branches 4545 4543 -2
=========================================
- Hits 18368 18367 -1
Misses 4022 4022
+ Partials 734 733 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Refactored the FindMax class by simplifying the constructor and optimizing the findMax method's checks and loop.
MuhammadMuneebMubashar
left a comment
There was a problem hiding this comment.
updated
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution! |
|
Nice implementation. Adding comments for each step would improve readability for beginners. |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution! |
|
Please reopen this pull request once you have made the required changes. If you need help, feel free to ask in our Discord server or ping one of the maintainers here. Thank you for your contribution! |
Fix logic to find maximum value in the array.
clang-format -i --style=file path/to/your/file.java